<template>
  <div>
    <p>Home</p>
    <!-- params字符串传参  -->
    <router-link to="/home/music/1">CNmusic</router-link>
    <!-- params 对象形式传参 注：不能书写path 得使用name -->
    <router-link :to="{ name: 'music', params: { id: '2' } }"
      >UNmusic</router-link
    >
    <br />
    <!-- query传参 字符串形式 -->
    <router-link to="/home/games?name=穿越火线&time=2007">Game1</router-link>
    <!-- query传参 对象形式 -->
    <router-link
      :to="{ path: '/home/games', query: { name: '英雄联盟', time: '2011' } }"
    >Game2</router-link>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "Home",
};
</script>

<style></style>
